import QtQuick 2.0
import QtQuick.Window 2.14

import "../basic"

Window {
    id: window
    visible: true
    width: 1317
    height: 933
    title: qsTr("Hello World")
    flags: Qt.FramelessWindowHint | Qt.Window | Qt.WindowSystemMenuHint |   // 无边框
           Qt.WindowMaximizeButtonHint | Qt.WindowMinMaxButtonsHint



    MouseArea {
        anchors.fill: parent
        // 鼠标按下记录的位置
        property point clickPos: "0,0"

        onPressed: function(mouse) {
            clickPos = Qt.point(mouse.x, mouse.y)
        }

        onPositionChanged: function(mouse)  {
            window.x += mouse.x - clickPos.x
            window.y += mouse.y - clickPos.y
        }

        onClicked: {
            BasicConfig.blankAreaClicked()
        }
    }
}
